<template>
  <div class="nav">
      <div class="box">
          <div @click="tohome">
              <van-icon name="wap-home-o" class="icon_l" />
          </div>
          <img 
          src="https://yanxuan.nosdn.127.net/static-union/164793255107785e.png" 
          class="img">
          <div class="nav_r">
              <van-icon name="search" />
              <van-icon name="shopping-cart-o" class="icon" />
          </div>
      </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
let router = useRouter()
const tohome = () => {
  router.push({
      path: '/'
  })
}
</script>

<style scoped lang="less">
* {
  margin: 0;
  padding: 0;
}

.nav {
  width: 100%;
  height: 84px;

  .box {
      display: flex;
      width: 100%;
      height: 44px;
      border-bottom: 1px solid #d9d9d9;
      justify-content: space-around;
      align-items: center;
      font-size: 30px;
  }

  .icon_l {
      margin: 8px -35px;
  }

  .img {
      width: 86px;
      height: 27px;
      transform: translate(40px);
  }

  .nav_r {
      display: inline-block;
      transform: translate(25px);

      .icon {
          transform: translate(10px);
      }
  }
}
</style>